<%@ page import="static com.test.ws.s1.utils.Res.fileUrl" %>
<!-- order.jsp -->
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>订单列表</title>
    <!-- 引入Bootstrap CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="css/common.css">
    <link rel="stylesheet" href="css/search.css">
    <script src="js/jquery-3.3.1.js"></script>
    <style type="text/css">
        body {
            background-color: #f8f9fa;
        }
        .topbar {
            position: relative;
            background-color: #fff;
            padding: 20px 0;
            border-bottom: 1px solid #ddd;
        }
        .topbar h1 {
            margin-left: 20px;
        }
        .order-item {
            margin-bottom: 20px;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 10px;
            background-color: #fff;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .order-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        }
        .order-item img {
            max-width: 100%;
            height: auto;
            border-radius: 5px;
        }
        .order-item .text1 {
            margin-top: 15px;
        }
        .order-item .text1 p {
            margin: 5px 0;
            font-size: 16px;
            color: #333;
        }
        .order-item .price {
            margin-top: 15px;
        }
        .order-item .price_num {
            font-size: 1.5em;
            font-weight: bold;
            color: #dc3545;
        }
        .order-item .price_num span {
            margin-right: 5px;
        }
        .order-item a.btn {
            margin-top: 15px;
            padding: 10px 20px;
            background-color: #007bff;
            color: #fff;
            border: none;
            border-radius: 5px;
            text-decoration: none;
            font-weight: 600;
            transition: background-color 0.2s;
        }
        .order-item a.btn:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="topbar">
        <h1 class="mt-5">订单列表</h1>
    </div>

    <div class="row mt-5">
        <c:forEach items="${orders}" var="xianluSouSuo">
            <div class="col-md-4 mb-4">
                <div class="order-item">
                    <div class="img">
                        <img src="<%=fileUrl%>${xianluSouSuo.route.route_img}" alt="${xianluSouSuo.route.route_name}" width="290px" height="150px">
                    </div>
                    <div class="text1">
                        <p>【尾单特卖】${xianluSouSuo.route.route_name}</p>
                        <p>随时出发，网付立享￥${xianluSouSuo.route.route_price}/1人起！爆款位置有限，抢完即止！</p>
                    </div>
                    <div class="price">
                        <p class="price_num">
                            <span>&yen;</span>
                            <span>${xianluSouSuo.route.route_price}</span>
                            <span>起</span>
                        </p>
                        <a href="${pageContext.request.contextPath}/classIfChassa?id=${xianluSouSuo.route.route_id}" class="btn">查看详情</a>
                        <a href="${pageContext.request.contextPath}/orderDel?ord_id=${xianluSouSuo.order_id}" class="btn">删除订单</a>
                    </div>
                </div>
            </div>
        </c:forEach>
    </div>
</div>

<!-- 引入Bootstrap JS 和依赖 -->
<script src="js/bootstrap.js/bootstrap.min.js"></script>
</body>
</html>
